package com.jhf.skypac_pda.db.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.jhf.skypac_pda.db.bean.DB_OperationRecord;
import com.jhf.skypac_pda.db.bean.DB_Permission;

import com.jhf.skypac_pda.db.gen.DB_OperationRecordDao;
import com.jhf.skypac_pda.db.gen.DB_PermissionDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig dB_OperationRecordDaoConfig;
    private final DaoConfig dB_PermissionDaoConfig;

    private final DB_OperationRecordDao dB_OperationRecordDao;
    private final DB_PermissionDao dB_PermissionDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        dB_OperationRecordDaoConfig = daoConfigMap.get(DB_OperationRecordDao.class).clone();
        dB_OperationRecordDaoConfig.initIdentityScope(type);

        dB_PermissionDaoConfig = daoConfigMap.get(DB_PermissionDao.class).clone();
        dB_PermissionDaoConfig.initIdentityScope(type);

        dB_OperationRecordDao = new DB_OperationRecordDao(dB_OperationRecordDaoConfig, this);
        dB_PermissionDao = new DB_PermissionDao(dB_PermissionDaoConfig, this);

        registerDao(DB_OperationRecord.class, dB_OperationRecordDao);
        registerDao(DB_Permission.class, dB_PermissionDao);
    }
    
    public void clear() {
        dB_OperationRecordDaoConfig.clearIdentityScope();
        dB_PermissionDaoConfig.clearIdentityScope();
    }

    public DB_OperationRecordDao getDB_OperationRecordDao() {
        return dB_OperationRecordDao;
    }

    public DB_PermissionDao getDB_PermissionDao() {
        return dB_PermissionDao;
    }

}
